package mn.idax.exchange.otc.enums;


import mn.idax.exchange.auth.util.ExceptionEnum;

/**
 * 定义API返回respCode及respMsg枚举类
 * @author fangyang
 * 字段定义描述：错误respCode值范围：100000	- 101000
 *            正确respCode值均为：000000
 */

public enum ResponseEnum implements ExceptionEnum {

	//服务异常
	REQUEST_EXCEPTION(10001,"System exception/server busy"),
	//参数不能为空
	PARAMETERS_NOT_EMPTY(10002, "Parameters can not be empty"),
	//非法参数
	ILLEPAR(10003,"Illegal parameter"),
	//不支持的交易对
	NOPAIR(10004, "Not supported pair"),
	//不支持交易
	PAIRNAME_ISNOTSUPPORT(10005,"The transaction is not supported"),
	//订单状态出错
	ORDERSTATEISERROR(10006,"order state is error"),
	//无账户信息
	TRANSACTION_INFORMATION_ISNULL(10007, "No account information "),
	//不存在密钥
	KEY_DOES_NOT_EXIST(10008, "key does not exist"),
	//时间戳为空
	NO_TIMESTAMP(10009, "Timestamp is empty"),
	//过期时间戳
	TIMESTAMP_EXPIRATED(10010, "Timestamp Expirated"),
	//签名为空
	NO_SIGN(10011, "Sign is empty"),
	//ip不在请求白名单中
	IP_BLACK(10012, "Trigger Blacklist for Wind Control. Disable for "),
	//签名不匹配
	SIGNATURE_MISMATCH(10013, "Signature mismatch"),
	//订单失败
	ORDER_FAILED(10014, "Place Order failed"),
	//取消订单失败
	WITHDRAWAL_FAILURE(10015, "Cancel  Order  failed"),
	//请求接口太频繁,请稍后再试
	API_LIMIT(10016, "The request interface is too frequent. Please try again later"),
	//交易所不支持对交易
	NO_PAIR(10017,"Exchanges do not support trading pair"),
	//货币价格为空
	VALUTION_COIN_PRICE(10018,"Currency price is empty"),
	//一次最多可以撤销5笔订单
	CANCELORDER_MAXIMUM5(10019, "A maximum of 5 orders can be revoked at a time"),
	//订单号为空
	ORDER_EMPTY(10020, "orderId is empty"),

	CHECK_DATE(10021,"Only data outside 24 hours can be queried"),

	INTERFACE_DISCARDED(10022,"The interface suspends service"),
	//secret为空
	NO_SECRET(10023, "secret is empty"),
//	没有交易权限
	NO_TRADING_RIGHTS(10024, "No trading rights"),
//	没有查询权限
	NO_QUERY_PERMISSION(10025, "No query permission"),

	REQUEST_EXPIRED(10026,"request expired");

	private Integer respCode;
	private String respMsg;

 	ResponseEnum(Integer respCode, String respMsg) {
		this.respCode = respCode;
		this.respMsg = respMsg;
	}

	@Override
	public String getRespMsg() {
		return respMsg;
	}

	public void setRespMsg(String respMsg) {
		this.respMsg = respMsg;
	}

	public void setRespCode(Integer respCode) {
		this.respCode = respCode;
	}


	@Override
	public Integer getRespCode() {
		return respCode;
	}


}
